using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using ACM.cmsarea08;
using ACM.cmsarea08.Controls;
using ACM.cmsarea08.Administration;
using ACM.cmsarea08.Administration.Core;


namespace ACM.cmsarea08.Administration {
	public partial class BasePluginsPage :  ACM.cmsarea08.Administration.Core.AdminPage {
		public ACM.cmsarea08.Controls.Itan_FormEditor myform;
		/*codice marco doc se nn ti piace cancellalo */
		public ACM.cmsarea08.Administration.Controls.MainButton adm_buttons;
		public ACM.cmsarea08.Administration.Controls.ListButton adm_button;
		/*fine codice marco*/
		protected override void OnPreInit(EventArgs e)
		{
			base.OnPreInit(e);
			if(ACM.cmsarea08.Users.CurrentUser.SimpleAdmin==true) {
				if(this.Page.Master==null) return;
				if(string.IsNullOrEmpty(this.Page.MasterPageFile)) return;
				 string currentFile = this.Page.MasterPageFile;
				 if(currentFile.IndexOf("dummy")!=-1) return;
				 if(currentFile.IndexOf("administration/")!=-1) {
				 	currentFile = currentFile.Insert(currentFile.LastIndexOf("/administration/")+16,"dummy");
				 	//Response.Write("SONO UC:" +currentFile);
				 	this.Page.MasterPageFile = currentFile;
				 }
			}
		}			
	}
	
}
